<style>
    table tr > th, table tr > td {
        text-align: center;
        vertical-align: middle !important;
    }
</style>
<div>
    <div class="statistic-box bg-success m-bottom-md" style="margin: 0;padding: 5px;border-radius: 0;">
        <div class="statistic-title">
            {{ schoolName }}
        </div>
    </div>
    <div class="statistic-icon-background">
        <i class="ion-eye"></i>
    </div>
    <table class="table table-hover">
        {% if reverse %}
            <tr class="info">
                <th width="30%">老师</th>
                <th width="30%">教辅书</th>
                <th>作业布置数</th>
                <th>布置题量(去重)</th>
                <th>布置题量(未去重)</th>
            </tr>
            {% for user in bookUsage %}
                {% for book in user['bookWorkTimes'] %}
                    <tr>
                        {% if loop.first %}
                            <td rowspan="{{ user['bookWorkTimes']|length }}">{{ user['teacherName'] }}</td>
                        {% endif %}
                        <td>{{ book['bookName'] }}</td>
                        <td>{{ book['workTimes'] }}</td>
                        <td>{{ book['topicCount'] }}</td>
                        <td>{{ book['topicRepeatCount'] }}</td>
                    </tr>
                {% endfor %}
            {% endfor %}
        {% else %}
            <tr class="info">
                <th width="30%">教辅书</th>
                <th width="30%">老师</th>
                <th>作业布置数</th>
                <th>布置题量(去重)</th>
                <th>布置题量(未去重)</th>
            </tr>
            {% for book in bookUsage %}
                {% for user in book['userWorkTimes'] %}
                    <tr>
                        {% if loop.first %}
                            <td rowspan="{{ book['userWorkTimes']|length }}">{{ book['bookName'] }}</td>
                        {% endif %}
                        <td>{{ user['teacherName'] }}</td>
                        <td>{{ user['workTimes'] }}</td>
                        <td>{{ user['topicCount'] }}</td>
                        <td>{{ user['topicRepeatCount'] }}</td>
                    </tr>
                {% endfor %}
            {% endfor %}
        {% endif %}
    </table>
</div>